/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-1 = 'cloudesl.aliyuncs.com',
    ap-northeast-2-pop = 'cloudesl.aliyuncs.com',
    ap-south-1 = 'cloudesl.aliyuncs.com',
    ap-southeast-1 = 'cloudesl.aliyuncs.com',
    ap-southeast-2 = 'cloudesl.aliyuncs.com',
    ap-southeast-3 = 'cloudesl.aliyuncs.com',
    ap-southeast-5 = 'cloudesl.aliyuncs.com',
    cn-beijing = 'cloudesl.aliyuncs.com',
    cn-beijing-finance-1 = 'cloudesl.aliyuncs.com',
    cn-beijing-finance-pop = 'cloudesl.aliyuncs.com',
    cn-beijing-gov-1 = 'cloudesl.aliyuncs.com',
    cn-beijing-nu16-b01 = 'cloudesl.aliyuncs.com',
    cn-chengdu = 'cloudesl.aliyuncs.com',
    cn-edge-1 = 'cloudesl.aliyuncs.com',
    cn-fujian = 'cloudesl.aliyuncs.com',
    cn-haidian-cm12-c01 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-finance = 'cloudesl.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'cloudesl.aliyuncs.com',
    cn-hangzhou-test-306 = 'cloudesl.aliyuncs.com',
    cn-hongkong = 'cloudesl.aliyuncs.com',
    cn-hongkong-finance-pop = 'cloudesl.aliyuncs.com',
    cn-huhehaote = 'cloudesl.aliyuncs.com',
    cn-north-2-gov-1 = 'cloudesl.aliyuncs.com',
    cn-qingdao = 'cloudesl.aliyuncs.com',
    cn-qingdao-nebula = 'cloudesl.aliyuncs.com',
    cn-shanghai = 'cloudesl.aliyuncs.com',
    cn-shanghai-et15-b01 = 'cloudesl.aliyuncs.com',
    cn-shanghai-et2-b01 = 'cloudesl.aliyuncs.com',
    cn-shanghai-finance-1 = 'cloudesl.aliyuncs.com',
    cn-shanghai-inner = 'cloudesl.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'cloudesl.aliyuncs.com',
    cn-shenzhen = 'cloudesl.aliyuncs.com',
    cn-shenzhen-finance-1 = 'cloudesl.aliyuncs.com',
    cn-shenzhen-inner = 'cloudesl.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'cloudesl.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'cloudesl.aliyuncs.com',
    cn-wuhan = 'cloudesl.aliyuncs.com',
    cn-yushanfang = 'cloudesl.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'cloudesl.aliyuncs.com',
    cn-zhangjiakou = 'cloudesl.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'cloudesl.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'cloudesl.aliyuncs.com',
    eu-central-1 = 'cloudesl.aliyuncs.com',
    eu-west-1 = 'cloudesl.aliyuncs.com',
    eu-west-1-oxs = 'cloudesl.aliyuncs.com',
    me-east-1 = 'cloudesl.aliyuncs.com',
    rus-west-1-pop = 'cloudesl.aliyuncs.com',
    us-east-1 = 'cloudesl.aliyuncs.com',
    us-west-1 = 'cloudesl.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('cloudesl', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ActivateApDeviceRequest {
  apMac?: string(name='ApMac', example='11:22:33:44:55:66'),
  extraParams?: string(name='ExtraParams'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model ActivateApDeviceResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model ActivateApDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ActivateApDeviceResponseBody(name='body'),
}

async function activateApDeviceWithOptions(request: ActivateApDeviceRequest, runtime: Util.RuntimeOptions): ActivateApDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apMac)) {
    body['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ActivateApDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function activateApDevice(request: ActivateApDeviceRequest): ActivateApDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return activateApDeviceWithOptions(request, runtime);
}

model AddApDeviceRequest {
  apMac?: string(name='ApMac', example='11:22:33:44:55:66'),
  clientToken?: string(name='ClientToken', example='1*'),
  extraParams?: string(name='ExtraParams', example='{}'),
  remark?: string(name='Remark'),
  serialNumber?: string(name='SerialNumber', example='18****'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model AddApDeviceResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model AddApDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddApDeviceResponseBody(name='body'),
}

async function addApDeviceWithOptions(request: AddApDeviceRequest, runtime: Util.RuntimeOptions): AddApDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apMac)) {
    body['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddApDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addApDevice(request: AddApDeviceRequest): AddApDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addApDeviceWithOptions(request, runtime);
}

model AddCompanyTemplateRequest {
  deviceType?: string(name='DeviceType', example='3'),
  eslSize?: string(name='EslSize', example='800X480'),
  extraParams?: string(name='ExtraParams', example='{}'),
  groupId?: string(name='GroupId', example='9'),
  ifDefault?: boolean(name='IfDefault', example='true'),
  ifMember?: boolean(name='IfMember', example='true'),
  ifOutOfInventory?: boolean(name='IfOutOfInventory'),
  ifPromotion?: boolean(name='IfPromotion', example='true'),
  ifSourceCode?: boolean(name='IfSourceCode', example='true'),
  layout?: int32(name='Layout', example='1'),
  scene?: string(name='Scene', example='NORMAL'),
  templateName?: string(name='TemplateName'),
  templateSceneId?: string(name='TemplateSceneId'),
  templateType?: string(name='TemplateType', example='normal'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
  vendor?: string(name='Vendor', example='ali'),
}

model AddCompanyTemplateResponseBody = {
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='InvalidResourceType.NotSupported'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='C033DCCE-FA85-5AD8-9A7C-C3F41220B898'),
  success?: boolean(name='Success', example='true'),
}

model AddCompanyTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddCompanyTemplateResponseBody(name='body'),
}

async function addCompanyTemplateWithOptions(request: AddCompanyTemplateRequest, runtime: Util.RuntimeOptions): AddCompanyTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.eslSize)) {
    body['EslSize'] = request.eslSize;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ifDefault)) {
    body['IfDefault'] = request.ifDefault;
  }
  if (!Util.isUnset(request.ifMember)) {
    body['IfMember'] = request.ifMember;
  }
  if (!Util.isUnset(request.ifOutOfInventory)) {
    body['IfOutOfInventory'] = request.ifOutOfInventory;
  }
  if (!Util.isUnset(request.ifPromotion)) {
    body['IfPromotion'] = request.ifPromotion;
  }
  if (!Util.isUnset(request.ifSourceCode)) {
    body['IfSourceCode'] = request.ifSourceCode;
  }
  if (!Util.isUnset(request.layout)) {
    body['Layout'] = request.layout;
  }
  if (!Util.isUnset(request.scene)) {
    body['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.templateName)) {
    body['TemplateName'] = request.templateName;
  }
  if (!Util.isUnset(request.templateSceneId)) {
    body['TemplateSceneId'] = request.templateSceneId;
  }
  if (!Util.isUnset(request.templateType)) {
    body['TemplateType'] = request.templateType;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddCompanyTemplate',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCompanyTemplate(request: AddCompanyTemplateRequest): AddCompanyTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCompanyTemplateWithOptions(request, runtime);
}

model AddUserRequest {
  clientToken?: string(name='ClientToken', example='1*'),
  extraParams?: string(name='ExtraParams', example='{}'),
  userId?: string(name='UserId', example='134****'),
}

model AddUserResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model AddUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserResponseBody(name='body'),
}

async function addUserWithOptions(request: AddUserRequest, runtime: Util.RuntimeOptions): AddUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddUser',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addUser(request: AddUserRequest): AddUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserWithOptions(request, runtime);
}

model ApplyCompanyTemplateVersionToStoresRequest {
  stores?: string(name='Stores', example='[\\"s-y9eoecc7mu\\"]'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
}

model ApplyCompanyTemplateVersionToStoresResponseBody = {
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='450E6CA4-5C5D-5DED-86C2-2B577C291764'),
  success?: boolean(name='Success', example='true'),
}

model ApplyCompanyTemplateVersionToStoresResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyCompanyTemplateVersionToStoresResponseBody(name='body'),
}

async function applyCompanyTemplateVersionToStoresWithOptions(request: ApplyCompanyTemplateVersionToStoresRequest, runtime: Util.RuntimeOptions): ApplyCompanyTemplateVersionToStoresResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.stores)) {
    body['Stores'] = request.stores;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyCompanyTemplateVersionToStores',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyCompanyTemplateVersionToStores(request: ApplyCompanyTemplateVersionToStoresRequest): ApplyCompanyTemplateVersionToStoresResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyCompanyTemplateVersionToStoresWithOptions(request, runtime);
}

model AssignUserRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  stores?: string(name='Stores', example='[s-dxsxxxxxx,s-dxsyyyyyyy]'),
  userId?: string(name='UserId', example='1344***'),
  userType?: string(name='UserType', example='USER_TYPE_COMPANY_OWNER'),
}

model AssignUserResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model AssignUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AssignUserResponseBody(name='body'),
}

async function assignUserWithOptions(request: AssignUserRequest, runtime: Util.RuntimeOptions): AssignUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.stores)) {
    body['Stores'] = request.stores;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userType)) {
    body['UserType'] = request.userType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AssignUser',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function assignUser(request: AssignUserRequest): AssignUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return assignUserWithOptions(request, runtime);
}

model BatchInsertItemsRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  itemInfo?: [ 
    {
      actionPrice?: int32(name='ActionPrice', example='500'),
      beClearance?: boolean(name='BeClearance', example='false'),
      beMember?: boolean(name='BeMember', example='true'),
      bePromotion?: boolean(name='BePromotion', example='true'),
      beSourceCode?: boolean(name='BeSourceCode', example='true'),
      brandName?: string(name='BrandName'),
      categoryName?: string(name='CategoryName'),
      customizeFeatureA?: string(name='CustomizeFeatureA'),
      customizeFeatureB?: string(name='CustomizeFeatureB'),
      customizeFeatureC?: string(name='CustomizeFeatureC'),
      customizeFeatureD?: string(name='CustomizeFeatureD'),
      customizeFeatureE?: string(name='CustomizeFeatureE'),
      customizeFeatureF?: string(name='CustomizeFeatureF'),
      customizeFeatureG?: string(name='CustomizeFeatureG'),
      customizeFeatureH?: string(name='CustomizeFeatureH'),
      customizeFeatureI?: string(name='CustomizeFeatureI'),
      customizeFeatureJ?: string(name='CustomizeFeatureJ'),
      customizeFeatureK?: string(name='CustomizeFeatureK'),
      customizeFeatureL?: string(name='CustomizeFeatureL'),
      customizeFeatureM?: string(name='CustomizeFeatureM'),
      customizeFeatureN?: string(name='CustomizeFeatureN'),
      customizeFeatureO?: string(name='CustomizeFeatureO'),
      customizeFeatureP?: string(name='CustomizeFeatureP'),
      customizeFeatureQ?: string(name='CustomizeFeatureQ'),
      customizeFeatureR?: string(name='CustomizeFeatureR'),
      customizeFeatureS?: string(name='CustomizeFeatureS'),
      customizeFeatureT?: string(name='CustomizeFeatureT'),
      customizeFeatureU?: string(name='CustomizeFeatureU'),
      customizeFeatureV?: string(name='CustomizeFeatureV'),
      customizeFeatureW?: string(name='CustomizeFeatureW'),
      customizeFeatureX?: string(name='CustomizeFeatureX', example='345678'),
      customizeFeatureY?: string(name='CustomizeFeatureY', example='YYY'),
      customizeFeatureZ?: string(name='CustomizeFeatureZ', example='ZZZZ'),
      energyEfficiency?: string(name='EnergyEfficiency'),
      forestFirstId?: string(name='ForestFirstId'),
      forestSecondId?: string(name='ForestSecondId'),
      inventoryStatus?: string(name='InventoryStatus', example='OUT_OF_STOCK'),
      itemBarCode?: string(name='ItemBarCode', example='690560583****'),
      itemId?: string(name='ItemId', example='1234567'),
      itemInfoIndex?: int32(name='ItemInfoIndex', example='1'),
      itemPicUrl?: string(name='ItemPicUrl', example='http://m.taobao.com/xxx.html'),
      itemQrCode?: string(name='ItemQrCode', example='http://m.taobao.com/xxx.html'),
      itemShortTitle?: string(name='ItemShortTitle'),
      itemTitle?: string(name='ItemTitle'),
      manufacturer?: string(name='Manufacturer'),
      material?: string(name='Material'),
      memberPrice?: int32(name='MemberPrice', example='800'),
      modelNumber?: string(name='ModelNumber', example='330'),
      originalPrice?: int32(name='OriginalPrice', example='1000'),
      priceUnit?: string(name='PriceUnit'),
      productionPlace?: string(name='ProductionPlace'),
      promotionEnd?: string(name='PromotionEnd', example='2020-02-01T00:00:00Z'),
      promotionReason?: string(name='PromotionReason'),
      promotionStart?: string(name='PromotionStart', example='2020-02-10T00:00:00Z'),
      promotionText?: string(name='PromotionText'),
      rank?: string(name='Rank'),
      saleSpec?: string(name='SaleSpec'),
      salesPrice?: int32(name='SalesPrice', example='1000'),
      skuId?: string(name='SkuId', example='1234567'),
      sourceCode?: string(name='SourceCode', example='1234567'),
      suggestPrice?: int32(name='SuggestPrice', example='600'),
      supplierName?: string(name='SupplierName'),
      taxFee?: string(name='TaxFee'),
      templateSceneId?: string(name='TemplateSceneId', example='23452'),
    }
  ](name='ItemInfo'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  syncByItemId?: boolean(name='SyncByItemId', example='true'),
}

model BatchInsertItemsResponseBody = {
  batchResults?: [ 
    {
      errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
      index?: int32(name='Index', example='1'),
      message?: string(name='Message', example='success'),
      success?: boolean(name='Success', example='true'),
    }
  ](name='BatchResults'),
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model BatchInsertItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchInsertItemsResponseBody(name='body'),
}

async function batchInsertItemsWithOptions(request: BatchInsertItemsRequest, runtime: Util.RuntimeOptions): BatchInsertItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.itemInfo)) {
    body['ItemInfo'] = request.itemInfo;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.syncByItemId)) {
    body['SyncByItemId'] = request.syncByItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchInsertItems',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchInsertItems(request: BatchInsertItemsRequest): BatchInsertItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchInsertItemsWithOptions(request, runtime);
}

model BindEslDeviceRequest {
  column?: string(name='Column', example='1'),
  containerId?: string(name='ContainerId', example='20'),
  containerName?: string(name='ContainerName'),
  eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
  extraParams?: string(name='ExtraParams', example='{}'),
  itemBarCode?: string(name='ItemBarCode', example='690560583****'),
  layer?: int32(name='Layer', example='1'),
  layoutId?: string(name='LayoutId', example='7'),
  layoutName?: string(name='LayoutName'),
  shelf?: string(name='Shelf', example='20200201'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model BindEslDeviceResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model BindEslDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindEslDeviceResponseBody(name='body'),
}

async function bindEslDeviceWithOptions(request: BindEslDeviceRequest, runtime: Util.RuntimeOptions): BindEslDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.column)) {
    body['Column'] = request.column;
  }
  if (!Util.isUnset(request.containerId)) {
    body['ContainerId'] = request.containerId;
  }
  if (!Util.isUnset(request.containerName)) {
    body['ContainerName'] = request.containerName;
  }
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.layer)) {
    body['Layer'] = request.layer;
  }
  if (!Util.isUnset(request.layoutId)) {
    body['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.layoutName)) {
    body['LayoutName'] = request.layoutName;
  }
  if (!Util.isUnset(request.shelf)) {
    body['Shelf'] = request.shelf;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindEslDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindEslDevice(request: BindEslDeviceRequest): BindEslDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindEslDeviceWithOptions(request, runtime);
}

model CreateStoreRequest {
  autoUnbindDays?: int32(name='AutoUnbindDays'),
  autoUnbindOfflineEsl?: boolean(name='AutoUnbindOfflineEsl'),
  barCodeEncode?: int32(name='BarCodeEncode', example='0'),
  clientToken?: string(name='ClientToken', example='1212'),
  extraParams?: string(name='ExtraParams', example='{}'),
  parentId?: string(name='ParentId', example='s-dxsxx****'),
  phone?: string(name='Phone', example='0571-5666888'),
  storeName?: string(name='StoreName'),
  timeZone?: string(name='TimeZone', example='GMT+08:00'),
  userStoreCode?: string(name='UserStoreCode', example='20200201'),
}

model CreateStoreResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  success?: boolean(name='Success', example='true'),
}

model CreateStoreResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateStoreResponseBody(name='body'),
}

async function createStoreWithOptions(request: CreateStoreRequest, runtime: Util.RuntimeOptions): CreateStoreResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoUnbindDays)) {
    body['AutoUnbindDays'] = request.autoUnbindDays;
  }
  if (!Util.isUnset(request.autoUnbindOfflineEsl)) {
    body['AutoUnbindOfflineEsl'] = request.autoUnbindOfflineEsl;
  }
  if (!Util.isUnset(request.barCodeEncode)) {
    body['BarCodeEncode'] = request.barCodeEncode;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.parentId)) {
    body['ParentId'] = request.parentId;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  if (!Util.isUnset(request.storeName)) {
    body['StoreName'] = request.storeName;
  }
  if (!Util.isUnset(request.timeZone)) {
    body['TimeZone'] = request.timeZone;
  }
  if (!Util.isUnset(request.userStoreCode)) {
    body['UserStoreCode'] = request.userStoreCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateStore',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createStore(request: CreateStoreRequest): CreateStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return createStoreWithOptions(request, runtime);
}

model DeleteApDeviceRequest {
  apMac?: string(name='ApMac', example='11:22:33:44:55:66'),
  extraParams?: string(name='ExtraParams'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DeleteApDeviceResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model DeleteApDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApDeviceResponseBody(name='body'),
}

async function deleteApDeviceWithOptions(request: DeleteApDeviceRequest, runtime: Util.RuntimeOptions): DeleteApDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apMac)) {
    body['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteApDevice(request: DeleteApDeviceRequest): DeleteApDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApDeviceWithOptions(request, runtime);
}

model DeleteCompanyTemplateRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  templateId?: string(name='TemplateId', example='742842379343605760'),
}

model DeleteCompanyTemplateResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A7571D49-9B36-5782-AD3D-32C8436D45B7'),
  success?: boolean(name='Success', example='true'),
}

model DeleteCompanyTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteCompanyTemplateResponseBody(name='body'),
}

async function deleteCompanyTemplateWithOptions(request: DeleteCompanyTemplateRequest, runtime: Util.RuntimeOptions): DeleteCompanyTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCompanyTemplate',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCompanyTemplate(request: DeleteCompanyTemplateRequest): DeleteCompanyTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCompanyTemplateWithOptions(request, runtime);
}

model DeleteItemRequest {
  itemBarCode?: string(name='ItemBarCode', example='6937372642255'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  unbindEslDevice?: boolean(name='UnbindEslDevice', example='false'),
}

model DeleteItemResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model DeleteItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteItemResponseBody(name='body'),
}

async function deleteItemWithOptions(request: DeleteItemRequest, runtime: Util.RuntimeOptions): DeleteItemResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.unbindEslDevice)) {
    body['UnbindEslDevice'] = request.unbindEslDevice;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteItem',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteItem(request: DeleteItemRequest): DeleteItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteItemWithOptions(request, runtime);
}

model DeleteStoreRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DeleteStoreResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model DeleteStoreResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteStoreResponseBody(name='body'),
}

async function deleteStoreWithOptions(request: DeleteStoreRequest, runtime: Util.RuntimeOptions): DeleteStoreResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteStore',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteStore(request: DeleteStoreRequest): DeleteStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteStoreWithOptions(request, runtime);
}

model DeleteUserRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  userId?: string(name='UserId', example='1344***'),
}

model DeleteUserResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model DeleteUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserResponseBody(name='body'),
}

async function deleteUserWithOptions(request: DeleteUserRequest, runtime: Util.RuntimeOptions): DeleteUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUser',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteUser(request: DeleteUserRequest): DeleteUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserWithOptions(request, runtime);
}

model DescribeApDevicesRequest {
  apMac?: string(name='ApMac', example='112233445566'),
  beActivate?: boolean(name='BeActivate', example='false'),
  extraParams?: string(name='ExtraParams'),
  model?: string(name='Model', example='aliyun'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  status?: boolean(name='Status', example='true'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DescribeApDevicesResponseBody = {
  apDevices?: [ 
    {
      beActivate?: boolean(name='BeActivate', example='true'),
      mac?: string(name='Mac', example='112233445566'),
      model?: string(name='Model', example='aliyun'),
      remark?: string(name='Remark'),
      status?: boolean(name='Status', example='false'),
      storeId?: string(name='StoreId', example='s-cxsds****'),
    }
  ](name='ApDevices'),
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model DescribeApDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApDevicesResponseBody(name='body'),
}

async function describeApDevicesWithOptions(request: DescribeApDevicesRequest, runtime: Util.RuntimeOptions): DescribeApDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apMac)) {
    body['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.beActivate)) {
    body['BeActivate'] = request.beActivate;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApDevices',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeApDevices(request: DescribeApDevicesRequest): DescribeApDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApDevicesWithOptions(request, runtime);
}

model DescribeAvailableEslModelsRequest {
  modelId?: string(name='ModelId', example='6cd23870539e43759e65eef5b6808a49'),
  name?: string(name='Name', example='aa_ssaaa'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAvailableEslModelsResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  eslModels?: [ 
    {
      deviceType?: string(name='DeviceType', example='3'),
      eslSize?: string(name='EslSize', example='800X480'),
      modelId?: string(name='ModelId', example='201167'),
      name?: string(name='Name'),
      screenHeight?: int32(name='ScreenHeight'),
      screenWidth?: int32(name='ScreenWidth'),
      vendor?: string(name='Vendor', example='ali'),
    }
  ](name='EslModels'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='436'),
}

model DescribeAvailableEslModelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAvailableEslModelsResponseBody(name='body'),
}

async function describeAvailableEslModelsWithOptions(request: DescribeAvailableEslModelsRequest, runtime: Util.RuntimeOptions): DescribeAvailableEslModelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.modelId)) {
    body['ModelId'] = request.modelId;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAvailableEslModels',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAvailableEslModels(request: DescribeAvailableEslModelsRequest): DescribeAvailableEslModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAvailableEslModelsWithOptions(request, runtime);
}

model DescribeBindersRequest {
  eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
  extraParams?: string(name='ExtraParams', example='{}'),
  itemBarCode?: string(name='ItemBarCode', example='690560583****'),
  itemTitle?: string(name='ItemTitle'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DescribeBindersResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  eslItemBindInfos?: [ 
    {
      actionPrice?: string(name='ActionPrice', example='690'),
      bePromotion?: boolean(name='BePromotion', example='true'),
      bindId?: string(name='BindId', example='b4adf048-f36d-4da5-a8bb-ab4adbd5eb04'),
      containerName?: string(name='ContainerName', example='2'),
      eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
      eslConnectAp?: string(name='EslConnectAp', example='11:22:33:44:55:66'),
      eslModel?: string(name='EslModel', example='AESL0213'),
      eslPic?: string(name='EslPic', example='kUzlfuzgayDo5uTXW3D66Q'),
      eslStatus?: string(name='EslStatus', example='ESL_STATUS_ONLINE'),
      gmtModified?: string(name='GmtModified', example='1656469716000'),
      itemBarCode?: string(name='ItemBarCode', example='690560583****'),
      itemId?: string(name='ItemId', example='1234567'),
      itemShortTitle?: string(name='ItemShortTitle'),
      itemTitle?: string(name='ItemTitle'),
      originalPrice?: string(name='OriginalPrice', example='500'),
      priceUnit?: string(name='PriceUnit', example='187'),
      promotionEnd?: string(name='PromotionEnd', example='2020-03-17T07:05:34Z'),
      promotionStart?: string(name='PromotionStart', example='2020-03-16T07:05:34Z'),
      promotionText?: string(name='PromotionText'),
      skuId?: string(name='SkuId', description='SkuID。', example='124'),
      storeId?: string(name='StoreId', example='s-pdwrrnkufn'),
      templateId?: string(name='TemplateId', example='123456'),
      templateSceneId?: string(name='TemplateSceneId', example='123456'),
    }
  ](name='EslItemBindInfos'),
  message?: string(name='Message', example='null'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='6E0FF7FA-3F89-598F-9BF2-57DF480FE111'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='24'),
}

model DescribeBindersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBindersResponseBody(name='body'),
}

async function describeBindersWithOptions(request: DescribeBindersRequest, runtime: Util.RuntimeOptions): DescribeBindersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.itemTitle)) {
    body['ItemTitle'] = request.itemTitle;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBinders',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeBinders(request: DescribeBindersRequest): DescribeBindersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBindersWithOptions(request, runtime);
}

model DescribeCompanyTemplateVersionsRequest {
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeCompanyTemplateVersionsResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='6248311A-3296-5084-B057-D0EC3DCE5C47'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='16'),
  versions?: [ 
    {
      version?: string(name='Version', example='1.1.0'),
    }
  ](name='Versions'),
}

model DescribeCompanyTemplateVersionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCompanyTemplateVersionsResponseBody(name='body'),
}

async function describeCompanyTemplateVersionsWithOptions(request: DescribeCompanyTemplateVersionsRequest, runtime: Util.RuntimeOptions): DescribeCompanyTemplateVersionsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCompanyTemplateVersions',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCompanyTemplateVersions(request: DescribeCompanyTemplateVersionsRequest): DescribeCompanyTemplateVersionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCompanyTemplateVersionsWithOptions(request, runtime);
}

model DescribeEslDeviceRequest {
  fromDate?: string(name='FromDate'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  storeId?: string(name='StoreId'),
  toDate?: string(name='ToDate'),
}

model DescribeEslDeviceResponseBody = {
  eslDetails?: [ 
    {
      eslBarCode?: string(name='EslBarCode'),
      itemBarCode?: long(name='ItemBarCode'),
      itemId?: long(name='ItemId'),
      itemShortTitle?: string(name='ItemShortTitle'),
      lastUpdateTime?: string(name='LastUpdateTime'),
      status?: string(name='Status'),
      storeId?: string(name='StoreId'),
    }
  ](name='EslDetails'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model DescribeEslDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEslDeviceResponseBody(name='body'),
}

async function describeEslDeviceWithOptions(request: DescribeEslDeviceRequest, runtime: Util.RuntimeOptions): DescribeEslDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.fromDate)) {
    body['FromDate'] = request.fromDate;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.toDate)) {
    body['ToDate'] = request.toDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEslDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEslDevice(request: DescribeEslDeviceRequest): DescribeEslDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEslDeviceWithOptions(request, runtime);
}

model DescribeEslDevicesRequest {
  eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
  eslStatus?: string(name='EslStatus', example='ESL_STATUS_ONLINE'),
  extraParams?: string(name='ExtraParams', example='{}'),
  fromBatteryLevel?: int32(name='FromBatteryLevel', example='20'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  toBatteryLevel?: int32(name='ToBatteryLevel', example='80'),
  type?: string(name='Type', example='ESL_TYPE_E_INK'),
  typeEncode?: string(name='TypeEncode', example='LOW_TEMPLATE'),
}

model DescribeEslDevicesResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  eslDevices?: [ 
    {
      batteryLevel?: int32(name='BatteryLevel', example='100'),
      eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
      eslSignal?: int32(name='EslSignal', example='54'),
      eslStatus?: string(name='EslStatus', example='ESL_STATUS_ONLINE'),
      lastCommunicateTime?: string(name='LastCommunicateTime', example='2020-03-16T07:04:16Z'),
      layoutId?: string(name='LayoutId', example='7'),
      layoutName?: string(name='LayoutName'),
      mac?: string(name='Mac', example='18:bc:5a:63:**:**'),
      model?: string(name='Model', example='AESL0213'),
      screenHeight?: int32(name='ScreenHeight', example='200'),
      screenWidth?: int32(name='ScreenWidth', example='200'),
      storeId?: string(name='StoreId', example='s-dxsxx****'),
      type?: string(name='Type', example='ESL_TYPE_E_INK'),
      typeEncode?: string(name='TypeEncode', example='THREE_COLOR'),
    }
  ](name='EslDevices'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model DescribeEslDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEslDevicesResponseBody(name='body'),
}

async function describeEslDevicesWithOptions(request: DescribeEslDevicesRequest, runtime: Util.RuntimeOptions): DescribeEslDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.eslStatus)) {
    body['EslStatus'] = request.eslStatus;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.fromBatteryLevel)) {
    body['FromBatteryLevel'] = request.fromBatteryLevel;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.toBatteryLevel)) {
    body['ToBatteryLevel'] = request.toBatteryLevel;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.typeEncode)) {
    body['TypeEncode'] = request.typeEncode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEslDevices',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEslDevices(request: DescribeEslDevicesRequest): DescribeEslDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEslDevicesWithOptions(request, runtime);
}

model DescribeEslModelByTemplateVersionRequest {
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
}

model DescribeEslModelByTemplateVersionResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  eslModels?: [ 
    {
      deviceType?: string(name='DeviceType', example='3'),
      eslPhysicalSize?: string(name='EslPhysicalSize'),
      eslSize?: string(name='EslSize', example='800X480'),
      image?: string(name='Image', example='/9xwqexcdaxasada....'),
      modelId?: string(name='ModelId', example='9946366490094af4ab16bfe023ad5f22'),
      name?: string(name='Name', example='test'),
      screenHeight?: int32(name='ScreenHeight'),
      screenWidth?: int32(name='ScreenWidth'),
      vendor?: string(name='Vendor', example='ali'),
    }
  ](name='EslModels'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='38F85526-14B8-54A8-A0BB-3B200BBC3682'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='7'),
}

model DescribeEslModelByTemplateVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEslModelByTemplateVersionResponseBody(name='body'),
}

async function describeEslModelByTemplateVersionWithOptions(request: DescribeEslModelByTemplateVersionRequest, runtime: Util.RuntimeOptions): DescribeEslModelByTemplateVersionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEslModelByTemplateVersion',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEslModelByTemplateVersion(request: DescribeEslModelByTemplateVersionRequest): DescribeEslModelByTemplateVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEslModelByTemplateVersionWithOptions(request, runtime);
}

model DescribeItemsRequest {
  bePromotion?: boolean(name='BePromotion', example='true'),
  extraParams?: string(name='ExtraParams', example='{}'),
  itemBarCode?: string(name='ItemBarCode', example='6941297417178'),
  itemId?: string(name='ItemId', example='6959294202901'),
  itemTitle?: string(name='ItemTitle'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  skuId?: string(name='SkuId', description='SkuID。', example='1234565'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DescribeItemsResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  items?: [ 
    {
      actionPrice?: int32(name='ActionPrice', example='500'),
      beClearance?: boolean(name='BeClearance', example='true'),
      beMember?: boolean(name='BeMember', example='false'),
      bePromotion?: boolean(name='BePromotion', example='false'),
      beSourceCode?: boolean(name='BeSourceCode', example='false'),
      brandName?: string(name='BrandName'),
      categoryName?: string(name='CategoryName'),
      customizeFeatureA?: string(name='CustomizeFeatureA'),
      customizeFeatureB?: string(name='CustomizeFeatureB', example='1:1:16'),
      customizeFeatureC?: string(name='CustomizeFeatureC'),
      customizeFeatureD?: string(name='CustomizeFeatureD'),
      customizeFeatureE?: string(name='CustomizeFeatureE'),
      customizeFeatureF?: string(name='CustomizeFeatureF'),
      customizeFeatureG?: string(name='CustomizeFeatureG'),
      customizeFeatureH?: string(name='CustomizeFeatureH'),
      customizeFeatureI?: string(name='CustomizeFeatureI'),
      customizeFeatureJ?: string(name='CustomizeFeatureJ'),
      customizeFeatureK?: string(name='CustomizeFeatureK'),
      customizeFeatureL?: string(name='CustomizeFeatureL'),
      customizeFeatureM?: string(name='CustomizeFeatureM'),
      customizeFeatureN?: string(name='CustomizeFeatureN'),
      customizeFeatureO?: string(name='CustomizeFeatureO'),
      customizeFeatureP?: string(name='CustomizeFeatureP'),
      customizeFeatureQ?: string(name='CustomizeFeatureQ'),
      customizeFeatureR?: string(name='CustomizeFeatureR'),
      customizeFeatureS?: string(name='CustomizeFeatureS'),
      customizeFeatureT?: string(name='CustomizeFeatureT'),
      customizeFeatureU?: string(name='CustomizeFeatureU'),
      customizeFeatureV?: string(name='CustomizeFeatureV'),
      customizeFeatureW?: string(name='CustomizeFeatureW'),
      customizeFeatureX?: string(name='CustomizeFeatureX'),
      customizeFeatureY?: string(name='CustomizeFeatureY'),
      customizeFeatureZ?: string(name='CustomizeFeatureZ'),
      energyEfficiency?: string(name='EnergyEfficiency', example='1kw/h'),
      forestFirstId?: string(name='ForestFirstId'),
      forestSecondId?: string(name='ForestSecondId'),
      gmtCreate?: string(name='GmtCreate', example='2020-03-09T00:00:00Z'),
      gmtModified?: string(name='GmtModified', example='2020-03-09T00:00:00Z'),
      inventoryStatus?: string(name='InventoryStatus', example='OUT_OF_STOCK'),
      itemBarCode?: string(name='ItemBarCode', example='01838'),
      itemId?: string(name='ItemId', example='123456'),
      itemInfoIndex?: int32(name='ItemInfoIndex', example='1'),
      itemPicUrl?: string(name='ItemPicUrl', example='http://m.taobao.com/xxx.html'),
      itemQrCode?: string(name='ItemQrCode', example='http://m.taobao.com/xxx.html'),
      itemShortTitle?: string(name='ItemShortTitle'),
      itemTitle?: string(name='ItemTitle'),
      manufacturer?: string(name='Manufacturer'),
      material?: string(name='Material'),
      memberPrice?: int32(name='MemberPrice', example='4000'),
      modelNumber?: string(name='ModelNumber', example='CH8850AS'),
      originalPrice?: int32(name='OriginalPrice', example='500'),
      priceUnit?: string(name='PriceUnit'),
      productionPlace?: string(name='ProductionPlace'),
      promotionEnd?: string(name='PromotionEnd', example='2020-02-11T00:00:00Z'),
      promotionReason?: string(name='PromotionReason'),
      promotionStart?: string(name='PromotionStart', example='2022-04-25T16:00:00Z'),
      promotionText?: string(name='PromotionText'),
      rank?: string(name='Rank'),
      saleSpec?: string(name='SaleSpec'),
      salesPrice?: int32(name='SalesPrice', example='500'),
      skuId?: string(name='SkuId', description='SKuID。', example='123456'),
      sourceCode?: string(name='SourceCode', example='123456'),
      suggestPrice?: int32(name='SuggestPrice', example='500'),
      supplierName?: string(name='SupplierName'),
      taxFee?: string(name='TaxFee'),
      templateSceneId?: string(name='TemplateSceneId', example='11223'),
    }
  ](name='Items'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  templateSceneId?: string(name='TemplateSceneId', example='1223'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model DescribeItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeItemsResponseBody(name='body'),
}

async function describeItemsWithOptions(request: DescribeItemsRequest, runtime: Util.RuntimeOptions): DescribeItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bePromotion)) {
    body['BePromotion'] = request.bePromotion;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.itemTitle)) {
    body['ItemTitle'] = request.itemTitle;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.skuId)) {
    body['SkuId'] = request.skuId;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeItems',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeItems(request: DescribeItemsRequest): DescribeItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeItemsWithOptions(request, runtime);
}

model DescribeStoreByTemplateVersionRequest {
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
}

model DescribeStoreByTemplateVersionResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  stores?: [ 
    {
      gmtModified?: string(name='GmtModified', example='2020-03-06T02:58:16Z'),
      level?: string(name='Level'),
      parentId?: string(name='ParentId', example='rm-2zeb2rt850x880j1n'),
      phone?: string(name='Phone'),
      storeId?: string(name='StoreId', example='s-nxwd8sutd6'),
      storeName?: string(name='StoreName'),
      templateVersion?: string(name='TemplateVersion', example='1.1.0'),
      timeZone?: string(name='TimeZone', example='GMT+08:00'),
      userStoreCode?: string(name='UserStoreCode', example='s-2zeb2r1t12sq'),
    }
  ](name='Stores'),
  success?: boolean(name='Success', example='true'),
}

model DescribeStoreByTemplateVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStoreByTemplateVersionResponseBody(name='body'),
}

async function describeStoreByTemplateVersionWithOptions(request: DescribeStoreByTemplateVersionRequest, runtime: Util.RuntimeOptions): DescribeStoreByTemplateVersionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeStoreByTemplateVersion',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeStoreByTemplateVersion(request: DescribeStoreByTemplateVersionRequest): DescribeStoreByTemplateVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeStoreByTemplateVersionWithOptions(request, runtime);
}

model DescribeStoreConfigRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model DescribeStoreConfigResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  storeConfigInfo?: {
    enableNotification?: boolean(name='EnableNotification', example='true'),
    notificationSilentTimes?: string(name='NotificationSilentTimes', example='[{"from":960,"to":1320},{"from":1170,"to":1230}]'),
    notificationWebHook?: string(name='NotificationWebHook', example='https://oapi.dingtalk.com/robot/send?.'),
    storeId?: string(name='StoreId', example='s-dxsxx****'),
    subscribeContents?: [ 
      {
        atAll?: boolean(name='AtAll'),
        atMobileList?: string(name='AtMobileList'),
        category?: string(name='Category'),
        enable?: boolean(name='Enable'),
        threshold?: string(name='Threshold'),
      }
    ](name='SubscribeContents'),
  }(name='StoreConfigInfo'),
  success?: boolean(name='Success', example='true'),
}

model DescribeStoreConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStoreConfigResponseBody(name='body'),
}

async function describeStoreConfigWithOptions(request: DescribeStoreConfigRequest, runtime: Util.RuntimeOptions): DescribeStoreConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeStoreConfig',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeStoreConfig(request: DescribeStoreConfigRequest): DescribeStoreConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeStoreConfigWithOptions(request, runtime);
}

model DescribeStoresRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  fromDate?: string(name='FromDate', example='2020-03-06T02:58:16Z'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  storeName?: string(name='StoreName'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
  toDate?: string(name='ToDate', example='2020-03-08T02:58:16Z'),
  userStoreCode?: string(name='UserStoreCode', example='123456'),
}

model DescribeStoresResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  stores?: [ 
    {
      autoUnbindDays?: int32(name='AutoUnbindDays'),
      autoUnbindOfflineEsl?: boolean(name='AutoUnbindOfflineEsl'),
      barCodeEncode?: int32(name='BarCodeEncode', example='0'),
      gmtCreate?: string(name='GmtCreate', example='2020-03-06T02:58:16Z'),
      gmtModified?: string(name='GmtModified', example='2020-03-06T02:58:16Z'),
      level?: string(name='Level'),
      parentId?: string(name='ParentId', example='s-aasx****'),
      phone?: string(name='Phone', example='0571-5666888'),
      storeId?: string(name='StoreId', example='s-dxsxx****'),
      storeName?: string(name='StoreName'),
      templateVersion?: string(name='TemplateVersion', example='1.1.0'),
      timeZone?: string(name='TimeZone'),
      userStoreCode?: string(name='UserStoreCode', example='20200201'),
    }
  ](name='Stores'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model DescribeStoresResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStoresResponseBody(name='body'),
}

async function describeStoresWithOptions(request: DescribeStoresRequest, runtime: Util.RuntimeOptions): DescribeStoresResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.fromDate)) {
    body['FromDate'] = request.fromDate;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.storeName)) {
    body['StoreName'] = request.storeName;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  if (!Util.isUnset(request.toDate)) {
    body['ToDate'] = request.toDate;
  }
  if (!Util.isUnset(request.userStoreCode)) {
    body['UserStoreCode'] = request.userStoreCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeStores',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeStores(request: DescribeStoresRequest): DescribeStoresResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeStoresWithOptions(request, runtime);
}

model DescribeTemplateByModelRequest {
  deviceType?: string(name='DeviceType', example='2'),
  eslSize?: string(name='EslSize', example='200X200'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
}

model DescribeTemplateByModelResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  items?: [ 
    {
      basePicture?: string(name='BasePicture'),
      brand?: string(name='Brand', example='ZTE'),
      eslSize?: string(name='EslSize', example='250X122'),
      eslType?: string(name='EslType'),
      height?: long(name='Height', example='200'),
      layout?: string(name='Layout', example='1'),
      scene?: string(name='Scene', example='MEMBER'),
      templateId?: string(name='TemplateId', example='772629024140898304'),
      templateName?: string(name='TemplateName'),
      templateSceneId?: string(name='TemplateSceneId'),
      templateVersion?: string(name='TemplateVersion', example='15.15.15'),
      width?: long(name='Width', example='400'),
    }
  ](name='Items'),
  message?: string(name='Message', example='null'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='B9E230F7-8BC6-5E4B-B540-14142DD94E3B'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='2'),
}

model DescribeTemplateByModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplateByModelResponseBody(name='body'),
}

async function describeTemplateByModelWithOptions(request: DescribeTemplateByModelRequest, runtime: Util.RuntimeOptions): DescribeTemplateByModelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.eslSize)) {
    body['EslSize'] = request.eslSize;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplateByModel',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeTemplateByModel(request: DescribeTemplateByModelRequest): DescribeTemplateByModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTemplateByModelWithOptions(request, runtime);
}

model DescribeUserLogRequest {
  eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
  extraParams?: string(name='ExtraParams', example='{}'),
  fromDate?: string(name='FromDate', example='2020-03-18T02:26:28Z'),
  itemBarCode?: string(name='ItemBarCode', example='690560583****'),
  itemShortTitle?: string(name='ItemShortTitle'),
  logId?: string(name='LogId', example='123456'),
  operationStatus?: string(name='OperationStatus', example='OPERATION_STATUS_NEW'),
  operationType?: string(name='OperationType', example='OPERATION_TYPE_BIND'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  toDate?: string(name='ToDate', example='2020-03-17T02:26:28Z'),
  userId?: string(name='UserId', example='134****'),
}

model DescribeUserLogResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
  userLogs?: [ 
    {
      actionPrice?: string(name='ActionPrice', example='500'),
      bePromotion?: boolean(name='BePromotion', example='false'),
      eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
      eslSignal?: int32(name='EslSignal', example='50'),
      gmtCreate?: string(name='GmtCreate', example='2020-03-17T02:26:17Z'),
      gmtModified?: string(name='GmtModified', example='2020-03-17T02:26:17Z'),
      i18nResultKey?: string(name='I18nResultKey'),
      itemBarCode?: string(name='ItemBarCode', example='690560583****'),
      itemId?: string(name='ItemId', example='123456'),
      itemShortTitle?: string(name='ItemShortTitle'),
      logId?: string(name='LogId', example='123456'),
      operationResponseTime?: string(name='OperationResponseTime', example='2020-03-17T02:26:17Z'),
      operationSendTime?: string(name='OperationSendTime', example='2020-03-17T02:25:17Z'),
      operationStatus?: string(name='OperationStatus', example='OPERATION_STATUS_NEW'),
      operationType?: string(name='OperationType', example='OPERATION_TYPE_BIND'),
      priceUnit?: string(name='PriceUnit'),
      resultCode?: string(name='ResultCode', example='2002'),
      spendTime?: string(name='SpendTime', example='10'),
      storeId?: string(name='StoreId', example='s-dxsxxx****'),
      userId?: string(name='UserId', example='134****'),
    }
  ](name='UserLogs'),
}

model DescribeUserLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUserLogResponseBody(name='body'),
}

async function describeUserLogWithOptions(request: DescribeUserLogRequest, runtime: Util.RuntimeOptions): DescribeUserLogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.fromDate)) {
    body['FromDate'] = request.fromDate;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.itemShortTitle)) {
    body['ItemShortTitle'] = request.itemShortTitle;
  }
  if (!Util.isUnset(request.logId)) {
    body['LogId'] = request.logId;
  }
  if (!Util.isUnset(request.operationStatus)) {
    body['OperationStatus'] = request.operationStatus;
  }
  if (!Util.isUnset(request.operationType)) {
    body['OperationType'] = request.operationType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.toDate)) {
    body['ToDate'] = request.toDate;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUserLog',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUserLog(request: DescribeUserLogRequest): DescribeUserLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUserLogWithOptions(request, runtime);
}

model DescribeUsersRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  userId?: string(name='UserId', example='1344***'),
  userName?: string(name='UserName'),
  userType?: string(name='UserType', example='USER_TYPE_COMPANY_OWNER'),
}

model DescribeUsersResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='100'),
  users?: [ 
    {
      bid?: string(name='Bid', example='26842'),
      dingTalkInfos?: [ 
        {
          dingTalkCompanyId?: string(name='DingTalkCompanyId', example='13124'),
          dingTalkUserId?: string(name='DingTalkUserId', example='3455566'),
        }
      ](name='DingTalkInfos'),
      ownerId?: string(name='OwnerId', example='1212124434535'),
      stores?: string(name='Stores', example='[s-dxsxxxxxx,s-dxsyyyyyyy]'),
      userId?: string(name='UserId', example='1344***'),
      userName?: string(name='UserName'),
      userType?: string(name='UserType', example='USER_TYPE_COMPANY_OWNER'),
    }
  ](name='Users'),
}

model DescribeUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsersResponseBody(name='body'),
}

async function describeUsersWithOptions(request: DescribeUsersRequest, runtime: Util.RuntimeOptions): DescribeUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userName)) {
    body['UserName'] = request.userName;
  }
  if (!Util.isUnset(request.userType)) {
    body['UserType'] = request.userType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUsers',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUsers(request: DescribeUsersRequest): DescribeUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUsersWithOptions(request, runtime);
}

model GetUserRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  userId?: string(name='UserId', example='1344***'),
}

model GetUserResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  user?: {
    bid?: string(name='Bid', example='26842'),
    dingTalkInfos?: [ 
      {
        dingTalkCompanyId?: string(name='DingTalkCompanyId', example='131242'),
        dingTalkUserId?: string(name='DingTalkUserId', example='34352525'),
      }
    ](name='DingTalkInfos'),
    ownerId?: string(name='OwnerId', example='12143124132'),
    stores?: string(name='Stores', example='[s-dxsxxxxxx,s-dxsyyyyyyy]'),
    userId?: string(name='UserId', example='1344***'),
    userName?: string(name='UserName'),
    userType?: string(name='UserType', example='USER_TYPE_COMPANY_OWNER'),
  }(name='User'),
}

model GetUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserResponseBody(name='body'),
}

async function getUserWithOptions(request: GetUserRequest, runtime: Util.RuntimeOptions): GetUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUser',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUser(request: GetUserRequest): GetUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserWithOptions(request, runtime);
}

model QueryTemplateListByGroupIdRequest {
  groupId?: string(name='GroupId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model QueryTemplateListByGroupIdResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  templateList?: [ 
    {
      basePicture?: string(name='BasePicture'),
      brand?: string(name='Brand'),
      eslSize?: string(name='EslSize'),
      eslType?: string(name='EslType'),
      groupId?: string(name='GroupId'),
      height?: long(name='Height'),
      layout?: string(name='Layout'),
      relation?: boolean(name='Relation'),
      scene?: string(name='Scene'),
      templateId?: string(name='TemplateId'),
      templateName?: string(name='TemplateName'),
      templateSceneId?: string(name='TemplateSceneId'),
      templateVersion?: string(name='TemplateVersion'),
      width?: long(name='Width'),
    }
  ](name='TemplateList'),
  totalCount?: int32(name='TotalCount'),
}

model QueryTemplateListByGroupIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryTemplateListByGroupIdResponseBody(name='body'),
}

async function queryTemplateListByGroupIdWithOptions(request: QueryTemplateListByGroupIdRequest, runtime: Util.RuntimeOptions): QueryTemplateListByGroupIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryTemplateListByGroupId',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryTemplateListByGroupId(request: QueryTemplateListByGroupIdRequest): QueryTemplateListByGroupIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryTemplateListByGroupIdWithOptions(request, runtime);
}

model SyncAddMaterialRequest {
  content?: string(name='Content', example='https://iotx-alg-picture-auto.oss-cn-shanghai.aliyuncs.com/0622/zxytest/12.jpg'),
  name?: string(name='Name'),
}

model SyncAddMaterialResponseBody = {
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='450E6CA4-5C5D-5DED-86C2-2B577C291764'),
  result?: {
    dynamicCode?: string(name='DynamicCode'),
    dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
    errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
    message?: string(name='Message', example='success'),
    success?: boolean(name='Success', example='true'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model SyncAddMaterialResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncAddMaterialResponseBody(name='body'),
}

async function syncAddMaterialWithOptions(request: SyncAddMaterialRequest, runtime: Util.RuntimeOptions): SyncAddMaterialResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SyncAddMaterial',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncAddMaterial(request: SyncAddMaterialRequest): SyncAddMaterialResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncAddMaterialWithOptions(request, runtime);
}

model UnassignUserRequest {
  extraParams?: string(name='ExtraParams', example='{}'),
  userId?: string(name='UserId', example='1344***'),
}

model UnassignUserResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model UnassignUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnassignUserResponseBody(name='body'),
}

async function unassignUserWithOptions(request: UnassignUserRequest, runtime: Util.RuntimeOptions): UnassignUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnassignUser',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unassignUser(request: UnassignUserRequest): UnassignUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return unassignUserWithOptions(request, runtime);
}

model UnbindEslDeviceRequest {
  column?: string(name='Column', example='1'),
  containerName?: string(name='ContainerName'),
  eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
  extraParams?: string(name='ExtraParams', example='{}'),
  itemBarCode?: string(name='ItemBarCode', example='690560583****'),
  layer?: int32(name='Layer', example='1'),
  shelf?: string(name='Shelf', example='20200201'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model UnbindEslDeviceResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model UnbindEslDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindEslDeviceResponseBody(name='body'),
}

async function unbindEslDeviceWithOptions(request: UnbindEslDeviceRequest, runtime: Util.RuntimeOptions): UnbindEslDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.column)) {
    body['Column'] = request.column;
  }
  if (!Util.isUnset(request.containerName)) {
    body['ContainerName'] = request.containerName;
  }
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.layer)) {
    body['Layer'] = request.layer;
  }
  if (!Util.isUnset(request.shelf)) {
    body['Shelf'] = request.shelf;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindEslDevice',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindEslDevice(request: UnbindEslDeviceRequest): UnbindEslDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindEslDeviceWithOptions(request, runtime);
}

model UpdateEslDeviceLightRequest {
  eslBarCode?: string(name='EslBarCode', example='18bc5a631ak9'),
  extraParams?: string(name='ExtraParams'),
  frequency?: string(name='Frequency', example='NORMAL'),
  itemBarCode?: string(name='ItemBarCode', example='6905605836648'),
  ledColor?: string(name='LedColor', example='GREEN'),
  lightUpTime?: int32(name='LightUpTime', example='30'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
}

model UpdateEslDeviceLightResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  failCount?: int32(name='FailCount', example='0'),
  lightFailEslInfos?: [ 
    {
      errorMessage?: string(name='ErrorMessage', example='The specified ESL device does not exist.'),
      eslBarCode?: string(name='EslBarCode', example='18bc5a63****'),
    }
  ](name='LightFailEslInfos'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
  successCount?: int32(name='SuccessCount', example='1'),
}

model UpdateEslDeviceLightResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateEslDeviceLightResponseBody(name='body'),
}

async function updateEslDeviceLightWithOptions(request: UpdateEslDeviceLightRequest, runtime: Util.RuntimeOptions): UpdateEslDeviceLightResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eslBarCode)) {
    body['EslBarCode'] = request.eslBarCode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.frequency)) {
    body['Frequency'] = request.frequency;
  }
  if (!Util.isUnset(request.itemBarCode)) {
    body['ItemBarCode'] = request.itemBarCode;
  }
  if (!Util.isUnset(request.ledColor)) {
    body['LedColor'] = request.ledColor;
  }
  if (!Util.isUnset(request.lightUpTime)) {
    body['LightUpTime'] = request.lightUpTime;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEslDeviceLight',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEslDeviceLight(request: UpdateEslDeviceLightRequest): UpdateEslDeviceLightResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEslDeviceLightWithOptions(request, runtime);
}

model UpdateStoreRequest {
  autoUnbindDays?: int32(name='AutoUnbindDays'),
  autoUnbindOfflineEsl?: boolean(name='AutoUnbindOfflineEsl'),
  barCodeEncode?: int32(name='BarCodeEncode', example='0'),
  extraParams?: string(name='ExtraParams', example='{}'),
  phone?: string(name='Phone', example='0571-5666888'),
  storeId?: string(name='StoreId', example='s-dxsxx****'),
  storeName?: string(name='StoreName'),
  templateVersion?: string(name='TemplateVersion', example='1.1.0'),
  timezone?: string(name='Timezone', example='GMT+08:00'),
  userStoreCode?: string(name='UserStoreCode', example='123456'),
}

model UpdateStoreResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='E69C8998-1787-4999-8C75-D663FF1173CF'),
  success?: boolean(name='Success', example='true'),
}

model UpdateStoreResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateStoreResponseBody(name='body'),
}

async function updateStoreWithOptions(request: UpdateStoreRequest, runtime: Util.RuntimeOptions): UpdateStoreResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoUnbindDays)) {
    body['AutoUnbindDays'] = request.autoUnbindDays;
  }
  if (!Util.isUnset(request.autoUnbindOfflineEsl)) {
    body['AutoUnbindOfflineEsl'] = request.autoUnbindOfflineEsl;
  }
  if (!Util.isUnset(request.barCodeEncode)) {
    body['BarCodeEncode'] = request.barCodeEncode;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.storeName)) {
    body['StoreName'] = request.storeName;
  }
  if (!Util.isUnset(request.templateVersion)) {
    body['TemplateVersion'] = request.templateVersion;
  }
  if (!Util.isUnset(request.timezone)) {
    body['Timezone'] = request.timezone;
  }
  if (!Util.isUnset(request.userStoreCode)) {
    body['UserStoreCode'] = request.userStoreCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateStore',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateStore(request: UpdateStoreRequest): UpdateStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateStoreWithOptions(request, runtime);
}

model UpdateStoreConfigRequest {
  enableNotification?: boolean(name='EnableNotification', example='true'),
  extraParams?: string(name='ExtraParams', example='{}'),
  notificationSilentTimes?: string(name='NotificationSilentTimes', example='[{"from":960,"to":1320},{"from":1170,"to":1230}]'),
  notificationWebHook?: string(name='NotificationWebHook', example='https://oapi.dingtalk.com/robot/send?.'),
  storeId?: string(name='StoreId', example='s-sds1233****'),
  subscribeContents?: string(name='SubscribeContents'),
}

model UpdateStoreConfigResponseBody = {
  code?: string(name='Code', example='-1001'),
  dynamicCode?: string(name='DynamicCode', example='PlatformResponseError.%s'),
  dynamicMessage?: string(name='DynamicMessage', example='The specified store %s does not exist.'),
  errorCode?: string(name='ErrorCode', example='MandatoryParameters'),
  errorMessage?: string(name='ErrorMessage', example='The specified resource type is invalid.'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='97B41B7F-A6EC-524C-9B8F-1BDD7E733F5E'),
  success?: boolean(name='Success', example='true'),
}

model UpdateStoreConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateStoreConfigResponseBody(name='body'),
}

async function updateStoreConfigWithOptions(request: UpdateStoreConfigRequest, runtime: Util.RuntimeOptions): UpdateStoreConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.enableNotification)) {
    body['EnableNotification'] = request.enableNotification;
  }
  if (!Util.isUnset(request.extraParams)) {
    body['ExtraParams'] = request.extraParams;
  }
  if (!Util.isUnset(request.notificationSilentTimes)) {
    body['NotificationSilentTimes'] = request.notificationSilentTimes;
  }
  if (!Util.isUnset(request.notificationWebHook)) {
    body['NotificationWebHook'] = request.notificationWebHook;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.subscribeContents)) {
    body['SubscribeContents'] = request.subscribeContents;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateStoreConfig',
    version = '2020-02-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateStoreConfig(request: UpdateStoreConfigRequest): UpdateStoreConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateStoreConfigWithOptions(request, runtime);
}

